package com.cencat.user.vo;

import lombok.Data;
import io.swagger.v3.oas.annotations.media.Schema;
import java.time.LocalDateTime;

/**
 * 权限列表视图对象
 * @author cencat
 * @since 2024-01-01
 */
@Data
@Schema(description = "权限列表视图对象")
public class PermissionListVO {

    @Schema(description = "权限ID", example = "1")
    private Long id;

    @Schema(description = "父权限ID", example = "0")
    private Long parentId;

    @Schema(description = "权限名称", example = "用户管理")
    private String permissionName;

    @Schema(description = "权限编码", example = "user:manage")
    private String permissionCode;

    @Schema(description = "权限类型（1-菜单，2-按钮，3-接口）", example = "1")
    private Integer permissionType;

    @Schema(description = "权限类型名称", example = "菜单")
    private String permissionTypeName;

    @Schema(description = "权限路径", example = "/user/manage")
    private String permissionPath;

    @Schema(description = "权限图标", example = "user")
    private String icon;

    @Schema(description = "是否外链（0-否，1-是）", example = "0")
    private Integer isExternal;

    @Schema(description = "是否显示（0-否，1-是）", example = "1")
    private Integer isVisible;

    @Schema(description = "权限状态（0-禁用，1-正常）", example = "1")
    private Integer status;

    @Schema(description = "状态名称", example = "正常")
    private String statusName;

    @Schema(description = "排序", example = "1")
    private Integer sortOrder;

    @Schema(description = "租户ID", example = "1")
    private Long tenantId;

    @Schema(description = "创建时间", example = "2024-01-01T10:00:00")
    private LocalDateTime createTime;

    @Schema(description = "创建人姓名", example = "管理员")
    private String createByName;

    @Schema(description = "更新时间", example = "2024-01-01T10:00:00")
    private LocalDateTime updateTime;

    @Schema(description = "更新人姓名", example = "管理员")
    private String updateByName;

    @Schema(description = "父权限名称", example = "系统管理")
    private String parentName;

    @Schema(description = "权限层级", example = "1")
    private Integer level;

    @Schema(description = "是否有子权限", example = "true")
    private Boolean hasChildren;

    @Schema(description = "子权限数量", example = "5")
    private Integer childrenCount;

    @Schema(description = "权限描述", example = "用户管理权限")
    private String description;

    @Schema(description = "组件路径", example = "@/views/user/index")
    private String component;

    @Schema(description = "备注", example = "权限备注信息")
    private String remark;
}